package FolderOperation.main;

import java.io.File;

public class Test {
    public static void main(String[] args) {
        if (args.length==0){
            System.out.println("无效操作");
            return ;
        }
        try {
            FolderOperation template=new FolderOperation(args[0]);
            switch(Integer.valueOf(args[1])){
                case 1:
                    if(args.length<3){
                        System.out.println("未输入字符串！");
                        return ;
                    }
                    template.findStr(args[2]);
                    break;
                case 2:
                    System.out.println("删除相同文件");
                    template.deleteSameFile(new File(args[0]));
                    break;
                case 3:
                    System.out.println("文件整理");
                    template.divideFolder();
                    break;
                default:
                    System.out.println("无效命令");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
